<template>
  <div ref="charts" style="width:270px;height:60px"></div>
</template>

<script>
import * as echarts from 'echarts'

export default {
  name: 'BarCharts',
  mounted () {
    let barCharts = echarts.init(this.$refs.charts)
    barCharts.setOption({
      grid: {
        top: 0,
        left: 0,
        right: 0,
        bottom: 0
      },
      tooltip: {},
      xAxis: {
        show: false,
        type: 'category',
        data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
      },
      yAxis: {
        show: false
      },
      series: [
        {
          type: 'bar',
          data: [15, 30, 52, 30, 28, 16, 20, 42, 45, 40, 37, 32]
        }
      ]
    })
  }
}
</script>

<style>
</style>
